import request from "@/utils/request";
// import {request} from "axios";

export function register(username, password, code, uuid) {
    return request({
        url: 'auth/register',
        method: 'post',
        data: {
            username,
            password,
            code,
            uuid
        }
    })
}

export function login(username, password, code, uuid) {
    return request({
        url: 'auth/login',
        method: 'post',
        data: {
            username,
            password,
            code,
            uuid
        }
    })
}

export function getCode() {
    return request({
        url: 'auth/get-code',
        method: "get"
    })
}

export function test(username, pageNo, pageSize) {
    return request ({
        url: 'user/record',
        method: 'post',
        data: {
            username,
            pageNo,
            pageSize
        }
    })
}

export function logout() {
    return request({
        url: 'auth/logout',
        method: 'delete'
    })
}

export function getUserInfo() {
    return request({
        url: 'auth/info',
        method: 'post'
    })
}